From 502043ef9001010fc8f6390a15b50d584d1e088f Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Fri, 2 Feb 2007 15:30:49 +0000 Subject: [PATCH] minios: Fix ret_from_exception routine. Stack consistency is now preserved. Signed-off-by: Grzegorz Milos --- extras/mini-os/arch/x86/x86_32.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/extras/mini-os/arch/x86/x86_32.S b/extras/mini-os/arch/x86/x86_32.S index 46fce169ca..b10bc23401 100644 --- a/extras/mini-os/arch/x86/x86_32.S +++ b/extras/mini-os/arch/x86/x86_32.S @@ -69,7 +69,7 @@ CS = 0x2C popl %ds; \ popl %es; \ addl $4,%esp; \ - iret; \ + iret; ENTRY(divide_error) pushl $0 # no error code @@ -101,10 +101,9 @@ do_exception: jmp ret_from_exception ret_from_exception: - movb CS(%esp),%cl - test $2,%cl # slow return to ring 2 or 3 - jne safesti - RESTORE_ALL + movb CS(%esp),%cl + addl $8,%esp + RESTORE_ALL # A note on the "critical region" in our callback handler. # We want to avoid stacking callback handlers due to events occurring -- 2.30.2